home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-10-26 | 6.2 KB | 143 lines | [TEXT/ScoM] |
- TRIGGERING MUSICAL PHRASES
-
- >what is the best way to have certain specific list items trigger musical
- >phrases?
- >
- >for example.
- >
- >(def-length
- >
- > hihat '(1/4 1/4 1/8 1/8 1/4)
- >
- >)
- >
- >
- >suppose now that i want item number four to trigger hihat 2 playing a
- >list generated by gen-sin. i could of course define zones and lengths
- >manually but this is rather tedious if there are many zones. is there a
- >function so i can do something like this:
- >
- >(setq rhytm lista listb lista listc (starting on the fifteenth note of
- >listb, play listx))
- >
- >(def zone (make-zone lista) (make-zone listb) ...etcetera)
-
- I would first try zone mechanism. Define instrument which zones are
- (1/4 1/4 1/8 1/8 1/4). Then, define symbol and other slot values as
- sublists
-
- ((material for zone1) (material for zone2) ...)
-
- Each material will start playing at time position determined by
- the zones. Notice that this solution does not allow overlapping
- material. To make such, each material must be allocated for an
- instrument and then use rest zone and the length of the zone of
- the material to be played, like (-16/1 1/1) -- this makes 16 bars
- empty and then plays one bar. This is a way to throw events in
- time. You can construct the zone list also by algorithms and so
- you can define events that will occur in random position in time
- or determined by lets say division series or something as cool...
-
- >> I would first try zone mechanism. Define instrument which zones are
- >> (1/4 1/4 1/8 1/8 1/4). Then, define symbol and other slot values as
- >> sublists
- >>
- >
- >ok. so far i am completely with you. i guess what i am after is constructing
- >an engine which will manipulate a predefined set of sequences according to a
- >few variables, which can be changed easily to try new combinations.
- >
- >suppose there are three sequences, say (seq1 '(1/8 1/8 1/4 1/8)) and (seq2
- >'(1/16 1/4 1/8)) and (seq 3 '(1/16 1/16 1/16 1/16 1/16 1/16 1/16)).
- >now play seq1 and on the 3d note start playing seq3 while still looping seq1
- >then on the 5th note of seq 3 start playing seq 2 then on 7th note of seq3
- >stop seq1 etcetera. this can of course be specified zone for zone like you
- >said. but i would prefer to be able to quickly change things around, insert
- >a gen-sin here and so forth. the time sheet would be ideal if only the
- >resolution would not be fixed for all tracks, so it wont work with patterns
- >of uneven lengths.
- >
- >so far the best alternative seems to be neurons, i just started looking at
- >them. or is there another way? the thing i keep getting caught on is that i
- >like to combine patterns of all kinds of time signatures. most sequencers
- >like to stay in 4/4.
-
- You have to program a preprocessor. Neurons might work but if they don't
- then you need to do it in Lisp. This shows you principles how to program
- preprocessors. This returns you a zoned list of elements for a given
- number of zones when you know the length pattern. What it does is
- accumulates length values and stacks symbols until zone value is reached
- and then pushes the stack on storage, which is returned when the last
- zone is processed. There are some cases which complicate the process
- and that is when the symbols are a zoned list. Length pattern is here
- always a flat list.
-
- ; (symbol-divide-zone2 '(1 2 3 4 5) '(1/16) '(1/1 1/1 1/1))
- ; ((1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1) (2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2) (3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3))
- ; (symbol-divide-zone2 '(a b c d e f g) '(1/16) '(1/2 1/2))
- ; ((a b c d e f g a) (b c d e f g a b))
- ; (symbol-divide-zone2 '(a b c d e f g) '(1/4) '(1/2 -1/2 1/2))
- ; ((a b) nil (c d))
- ; (symbol-divide-zone2 '(= b c) '(1/8 1/16 1/16) '(5/8))
- ; ((= b c = b c =))
- ; the following makes also this work properly
- ; (symbol-divide-zone2 '((1 2 3) (3 4) (5 6)) '(1/4) '(1/1 1/1 1/1))
- ; ((1 2 3 1) (3 4 3 4) (5 6 5 6))
- ; (symbol-divide-zone2 '((1 2 3) (3 4) (5 6)) '(1/4) '(1/1 -1/1 1/1))
- ; ((1 2 3 1) nil (5 6 5 6))
-
- (defun symbol-divide-zone2 (symbols lengths zones)
- (prog (current-master current-symbols flat symbol-list counts out zone-len collect len-list master-symbol-list symbol-list)
- (unless (listp (car symbols))
- (setq flat t)
- (setq symbols (list symbols)))
- (setq symbol-list symbols)
- (setq master-symbol-list symbols)
- (setq current-symbols (car symbol-list))
- (setq current-master current-symbols)
- (setq symbol-list (cdr symbol-list))
- (if (null symbol-list) (setq symbol-list symbols))
- (setq counts 0)
- (setq len-list lengths)
- (while zones
- (setq zone-len (- (get-tick (car zones)) counts))
- (cond ((<= zone-len 0)
- (push nil out)
- (setq counts 0)
- (setq zone-len 0)
- (setq zones (cdr zones))
- (unless flat
- (setq current-symbols (car symbol-list))
- (setq current-master current-symbols)
- (setq symbol-list (cdr symbol-list))
- (when (null symbol-list)
- (setq symbol-list master-symbol-list))))
- (t (setq collect nil)
- (setq counts 0)
- (while (< counts zone-len)
- (push (car current-symbols) collect)
- (setq current-symbols (cdr current-symbols))
- (when (null current-symbols)
- (setq current-symbols current-master))
- (setq counts (+ counts (abs (get-tick (car len-list)))))
- (setq len-list (cdr len-list))
- (when (null len-list)
- (setq len-list lengths)))
- (push (nreverse collect) out)
- (unless flat
- (setq current-symbols (car symbol-list))
- (setq current-master current-symbols)
- (setq symbol-list (cdr symbol-list))
- (when (null symbol-list)
- (setq symbol-list master-symbol-list)))
- (setq zones (cdr zones))))
- (setq counts (- counts zone-len)))
- (return (nreverse out))))
-
- Notice that def-section-timesheets allows multiple resolutions in
- timesheet although the column resolution is equal to them. But
- each instrument will continue cycling through the zone boundaries and
- so you can start and stop it playing by the timesheet string. If you
- want the same instrument to play in different time position then
- group instruments to consist of several partials in def-orchestra.
-